When user equipment roams from a home location to a roaming location (the home location refers to an area in which the user equipment subscribes to a service, and the roaming location refers to an area, beyond the home location, in which the user equipment currently is located), if the user equipment uses a voice service, a data service, and the like in the roaming location, because of charging and service management, a Mobility Management Entity (MME), a Serving GPRS Support Node (SGSN), and the like in the roaming location usually need to control a related service to return to a home gateway, and the home gateway performs specific charging, service management, and the like. Gateway information of the home gateway of the user equipment needs to be first determined, so that the MME or the SGSN returns the service of the user equipment to the home gateway.
In the prior art, a domain name is generated according to a number segment of the user equipment, and the gateway information of the home gateway is determined according to a correspondence between a domain name and gateway information. Because of a large quantity of user equipments and excessive number segments of the user equipments, a Domain Name Server (DNS), a local host file of the MME, or a local host file of the SGSN needs to configure and maintain domain names including all number segments, and consequently maintenance costs of an operator are high.